//
//  NSString+HXString.h
//  HXTClient
//
//  Created by lemon on 14-4-4.
//  Copyright (c) 2014年 easaa. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (HXString)

/**
 *  计算字符串宽度
 *
 *  @param font 字体
 *  @param size 大小范围
 *
 *  @return 字符串size
 */
- (CGSize)sizeWithFont:(UIFont *)font andConstrainedToSize:(CGSize)size;

/**
 *  将日期字符串以oneFormatter格式转换成twoFormatter格式
 */
- (NSString *)dateStringWithFormatter:(NSString *)oneFormatter convertToFormatter:(NSString *)twoFormatter;

- (NSDate *)stringDateConvertToDateWithFormatter:(NSString *)formatter;

//验证手机号
- (BOOL)validatePhone;

+ (NSString *)dateStirng:(NSString *)dateString withOldFormatter:(NSString *)oldFormatter convertToNewFormatter:(NSString *)newFormatter;

//将日期转换成评论时间
+ (NSString *)DateStringConvertToCommentTime:(NSString *)dateString formatter:(NSString *)formatter;





@end
